#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
	pid_t pid;
if((pid=fork())<0)
{
printf("fork error!\n");
exit(1);
}
else if(pid==0)
{
printf("in a child process!\n%ld\n",(long)getpid());
}
else
{
printf("in the parent process!\n%ld\n",(long)getpid());
}
exit(0);
}
